//
//  ViewController.m
//  MathLatex
//
//  Created by 鹏 on 2020/4/13.
//  Copyright © 2020 鹏. All rights reserved.
//

#import "ViewController.h"
#import <MathsLatex/MathsLatex.h>
@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    MathLayer *subject = [[MathLayer alloc] initWithFrame:CGRectMake(20, 100, self.view.frame.size.width-40, 0)];
    subject.font = [UIFont systemFontOfSize:15];
    subject.mathcolor = [UIColor blackColor];
    subject.math_lineSpacing = 12;
    dispatch_async(dispatch_get_main_queue(), ^{
       NSString *titles = [NSString stringWithFormat:@"在给定的条件下，下列选项所示的物质间转化均能实现的是\\left[\\begin{array}{cc|c}1&2&3\\4&5&6\\end{array}\\right]"];
       subject.testStr = titles;
    });
    
    subject.MatchBlock = ^(CGFloat math){
        NSLog(@"%f",math);
    };
    [self.view addSubview:subject];
}


@end
